package com.hkg.springcloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @ClassName : applicatonconfig
 * @Author : 坏老爷
 * @Date: 2020-03-21 20:57
 */
@Configuration
public class ApplicatonConfig {
    @Bean
    @LoadBalanced    //给RestTemplate赋予负载均衡的能力
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }

}
